﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QueryData;

internal class 临时禁用全局查询过滤器
{
    void MyMethod()
    {
        using (var db = new BasicDbContext())
        {
            // 调用IgnoreQueryFilters方法可以临时禁用该数据集的全局查询过滤器
            (from x in db.BasicEntities.IgnoreQueryFilters() select x).ToList();
        }
    }
}
